import Cookie from 'js-cookie'

export const Authorization = 'Authorization' // Token 常量

//	设置Token
export const setToken = (token: string) => {
  Cookie.set(
    Authorization,
    'Bearer ' + token,
    { expires: 3600 } // 后台配置一天失效token
  )
}

export const getToken = () => Cookie.get(Authorization) // 获取Token

export const removeToken = () => Cookie.remove(Authorization) //	移除Token
